<template>
  <div class="home">
    <router-view />

<van-tabbar route>
  <van-tabbar-item v-for="(item,index) in foot" :key="index" replace :to="`/home/${item.path}`" :icon="item.meta.icon">{{item.meta.title}}</van-tabbar-item>
  
</van-tabbar>
  </div>
</template>

<script>
// @ is an alias to /src


export default {
  name: 'Home',
  components: {
   
  },
  data(){
    return{
      foot:[
      {
        path: 'homePage',
        name: 'HomePage',
        component: () => import(/* webpackChunkName: "about" */ '../views/home/HomePage.vue'),
        meta:{
          icon:"star-o",
          title:"首页"
        }
      },
      {
        path: 'classify',
        name: 'Classify',
        component: () => import(/* webpackChunkName: "about" */ '../views/home/Classify.vue'),
        meta:{
          icon:"star-o",
          title:"分类"
        }
      },
      {
        path: 'jingXi',
        name: 'JingXi',
        component: () => import(/* webpackChunkName: "about" */ '../views/home/JingXi.vue'),
        meta:{
          icon:"star-o",
          title:"京喜"
        }
      },
      {
        path: 'shopCar',
        name: 'ShopCar',
        component: () => import(/* webpackChunkName: "about" */ '../views/home/ShopCar.vue'),
        meta:{
          icon:"star-o",
          title:"购物车"
        }
      },
      {
        path: 'my',
        name: 'My',
        component: () => import(/* webpackChunkName: "about" */ '../views/home/My.vue'),
        meta:{
          icon:"star-o",
          title:"未登录"
        }
      },
    ]
    }
  }
}
</script>
